<?php


namespace app\xiangji\validates;


use think\Validate;

class LoveDiaryValidate extends Validate
{
    protected $rule = [
        'content|日记内容'   => 'require|max:500',
        'images|图片'    => 'array',
        'labels|标签'    => 'array',
        'location|定位'    => 'require',
        'weather|天气'    => 'require',
        'page|页码'      => 'require|integer|min:1',
        'limit|每页条数'     => 'require|integer|min:1',
    ];

    protected $scene = [
        'create'    => ['content', 'images', 'labels', 'location', 'weather'],
        'fetch'     => ['page', 'limit']
    ];
}
